//#include <stdio.h>
#include <stdlib.h>
#include <android/log.h>
#include "NTEngine/NTEngine.h"

bool gThrowWhenHalt = true;

namespace NTEngine {
namespace { // anonymous
#define LOGE( ... ) ( ( void )__android_log_print( ANDROID_LOG_ERROR, "NTEngine", __VA_ARGS__ ) )
} // namespace {}

void halt( const char* msg, const char* file, unsigned line ) {
	if ( gThrowWhenHalt ) {
		LOGE( "(File)%s:(Line)%d : %s\n", file, line, msg );
		throw EXCEPTION_IGNORE;
	} else {
		LOGE( "(File)%s:(Line)%d : %s\n", file, line, msg );
		*reinterpret_cast< int* >( 0 ) = 0; // 即死させる
	}
}

} // namespace NTEngine
